package ru.nnstu.medialib.service;

import java.util.List;

import ru.nnstu.medialib.dao.PhotoDAO;
import ru.nnstu.medialib.dao.PhotoDAOImpl;
import ru.nnstu.medialib.domain.Photo;

public class PhotoServiceImpl implements PhotoService {
	PhotoDAO photoDAO;

	public PhotoServiceImpl() {
		super();
		photoDAO = new PhotoDAOImpl();
	}

	@Override
	public void addPhoto(Photo photo) {
		photoDAO.savePhoto(photo);
	}

	@Override
	public List<Photo> listPhoto() {
		return photoDAO.listPhoto();
	}

	@Override
	public void removePhoto(Long id) {
		photoDAO.removePhoto(id);
	}

}
